package com.jikexueyuan.drawingboard;

import android.graphics.PointF;

/**
 * Created by Administrator on 2015/3/20.
 */

public class PenTrackContainer {
    private int mPropertyColor;
    private PointF mPropertyPoint = new PointF();;
    private float mPropertyWidth;
    private int mPropertyAction;
    private long mTimeStamp;
    private long mTimeGapNext;

    public void PenTrackContainer() {
        mPropertyColor = 0;
        mPropertyPoint.set(0,0);
        mPropertyWidth = 0;
        mPropertyAction = 0;
        mTimeStamp = 0;
        mTimeGapNext = 0;
    }

    public void setPenTrackPoint(int color, float width, int action, PointF point, long time) {
        mPropertyColor = color;
        mPropertyWidth = width;
        mPropertyPoint.set(point.x, point.y);
        mPropertyAction = action;
        mTimeStamp = time;
    }

    public void setPenTrackPoint(PenTrackContainer penTrack) {
        mPropertyColor = penTrack.mPropertyColor;
        mPropertyWidth = penTrack.mPropertyWidth;
        mPropertyPoint.set(penTrack.mPropertyPoint.x, penTrack.mPropertyPoint.y);
        mPropertyAction = penTrack.mPropertyAction;
        mTimeStamp = penTrack.mTimeStamp;
    }

    public int getColor() {
        return mPropertyColor;
    }

    public float getWidth() {
        return mPropertyWidth;
    }

    public int getAction() {
        return mPropertyAction;
    }

    public PointF getPoint() {
        return mPropertyPoint;
    }

    public long getTimeStamp() { return mTimeStamp; }

    public long getTimeGapNext() { return mTimeGapNext; }

    public void setTimeGapNext(long timeGap) { mTimeGapNext = timeGap; }

    public void clearPoint() {
        mPropertyColor = 0;
        mPropertyPoint.set(0,0);
        mPropertyWidth = 0;
        mPropertyAction = 0;
        mTimeStamp = 0;
        mTimeGapNext = 0;
    }
}
